package com.tanger.permission.entity.vo;

import com.google.common.base.MoreObjects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.List;


/**
 * @Description 角色权限实体类
 * @Author Hchenbin
 * @Date 2022/6/27 12:12
 * @Version 1.0
 */
@Data
@ApiModel(value = "EntityRolePermission",description = "角色权限实体类")
public class RolePermissionVo implements Serializable {

	private static final long serialVersionUID = 1L;
	@ApiModelProperty(value = "ID")
	private Long id;
	@ApiModelProperty(value = "角色ID")
	private Long roleId;
	@ApiModelProperty(value = "权限ID")
	private Long permissionId;
	@ApiModelProperty(value = "菜单编码")
	private String menuCode;
	@ApiModelProperty(value = "菜单类型")
	private Integer menuType;
	@ApiModelProperty(value = "菜单名称")
	private String menuName;
	@ApiModelProperty(value = "菜单路径")
	private String menuPath;
	@ApiModelProperty(value = "菜单组件")
	private String menuComponent;
	@ApiModelProperty(value = "菜单序号")
	private Long menuSequence;
	@ApiModelProperty(value = "菜单状态(1.可用 0.隐藏)")
	private Integer menuStatus;
	@ApiModelProperty(value = "菜单父级ID")
	private Long parentId;
	@ApiModelProperty("子集权限")
	private List<LinkedHashMap<String,Object>> children;
	@ApiModelProperty("菜单按钮权限集合")
	private List<PermissionButtonVo> permissionButtons;

	@Override
	public String toString() {
		return MoreObjects.toStringHelper(this)
			.add("id", id)
			.add("roleId", roleId)
			.add("permissionId", permissionId)
			.add("menuCode", menuCode)
			.add("menuType", menuType)
			.add("menuName", menuName)
			.add("menuPath", menuPath)
			.add("menuComponent", menuComponent)
			.add("menuSequence", menuSequence)
			.add("menuStatus", menuStatus)
			.add("parentId", parentId)
			.add("children",children)
			.add("permissionButtons",permissionButtons)
			.toString();
	}
}
